/**
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corporation 2008. All Rights Reserved.
 * 
 * Note to U.S. Government Users Restricted Rights:
 * Use, duplication or disclosure restricted by GSA ADP Schedule
 * Contract with IBM Corp.
 *
 * $Id$
 */
package it.uniba.di.collab.jazzfeed.common.model.impl;

import it.uniba.di.collab.jazzfeed.common.model.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class JazzfeedFactoryImpl extends EFactoryImpl implements
		JazzfeedFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static JazzfeedFactory init() {
		try {
			JazzfeedFactory theJazzfeedFactory = (JazzfeedFactory) EPackage.Registry.INSTANCE
					.getEFactory("it.uniba.di.collab.jazzfeed"); //$NON-NLS-1$ 
			if (theJazzfeedFactory != null) {
				return theJazzfeedFactory;
			}
		} catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new JazzfeedFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public JazzfeedFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
		case JazzfeedPackage.ROOM:
			return (EObject) createRoom();
		case JazzfeedPackage.ROOM_HANDLE:
			return (EObject) createRoomHandle();
		case JazzfeedPackage.USER:
			return (EObject) createUser();
		case JazzfeedPackage.USER_HANDLE:
			return (EObject) createUserHandle();
		default:
			throw new IllegalArgumentException(
					"The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Room createRoom() {
		RoomImpl room = new RoomImpl();
		return room;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public RoomHandle createRoomHandle() {
		RoomHandleImpl roomHandle = new RoomHandleImpl();
		return roomHandle;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public User createUser() {
		UserImpl user = new UserImpl();
		return user;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public UserHandle createUserHandle() {
		UserHandleImpl userHandle = new UserHandleImpl();
		return userHandle;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public JazzfeedPackage getJazzfeedPackage() {
		return (JazzfeedPackage) getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	public static JazzfeedPackage getPackage() {
		return JazzfeedPackage.eINSTANCE;
	}

} //JazzfeedFactoryImpl
